﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cool.Application.System.DeptService.Dtos;
using Cool.Core.ComDto;
using Cool.Core.Entities.System;

namespace Cool.Application.System.DeptService
{
    public interface IDeptService
    {
        /// <summary>
        /// 查询菜单列表
        /// </summary>
        /// <returns></returns>
        Task<List<DeptTreeTableReturnDto>> GetListAsync(DeptTreeTableSearchDto menuTreeTableSearchDto);


        /// <summary>
        /// 获取所有部门树列表
        /// </summary>
        /// <returns></returns>
        Task<List<TreeOutData>> GetTreeSelect();

        /// <summary>
        /// 根据角色ID查询部门下拉树结构
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<dynamic> GetRoleDeptTreeSelect(int roleId);

        /// <summary>
        /// 查询部门不包括自己
        /// </summary>
        /// <returns></returns>
        Task<List<DeptTreeTableReturnDto>> GetListDeptExcludeChild(int deptId);
        
        /// <summary>
        /// 查询菜单详细
        /// </summary>
        /// <param name="deptId"></param>
        /// <returns></returns>
        Task<SysDept> GetAsync(int deptId);


        /// <summary>
        /// 新增菜单
        /// </summary>
        /// <param name="menu"></param>
        Task<SysDept> AddAsync(SysDept menu);

        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="dept"></param>
        Task UpdateAsync(SysDept dept);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="deptId"></param>
        Task DeleteAsync(int deptId);
    }
}
